package com.kczd.jinlan.view.mine;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.kczd.jinlan.R;
import com.kczd.jinlan.view.LoginVerificationActivity;

/**
 * yang_g
 * 账户安全中心
 * Created by Administrator on 2017/5/15.
 */

public class SecurityActivity extends Activity implements View.OnClickListener {
    private TextView id_fanhui;
private LinearLayout layout_phone_number;//绑定手机号
private LinearLayout layout_safety_problem;//绑定安全问题
private LinearLayout layout_payment_password;//修改支付密码
private LinearLayout layout_login_password;//修改登录密码

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.security_activity);
    }

    @Override
    public void onContentChanged() {
        super.onContentChanged();
        id_fanhui = (TextView) findViewById(R.id.id_fanhui);
        id_fanhui.setOnClickListener(this);
        layout_phone_number= (LinearLayout) findViewById(R.id.layout_phone_number);
        layout_phone_number.setOnClickListener(this);
        layout_safety_problem= (LinearLayout) findViewById(R.id.layout_safety_problem);
        layout_safety_problem.setOnClickListener(this);
        layout_payment_password= (LinearLayout) findViewById(R.id.layout_payment_password);
        layout_payment_password.setOnClickListener(this);
        layout_login_password= (LinearLayout) findViewById(R.id.layout_login_password);
        layout_login_password.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.id_fanhui://返回
                finish();
                break;
            case R.id.layout_phone_number://绑定手机号
                startActivity(new Intent(SecurityActivity.this,PhoneNumberActivity.class));
                break;
            case R.id.layout_safety_problem://绑定安全问题
                startActivity(new Intent(SecurityActivity.this,SafetyActivity.class));
                break;
            case R.id.layout_payment_password://修改支付密码
                startActivity(new Intent(SecurityActivity.this,PaymentActivity.class));
                break;
            case R.id.layout_login_password://修改登录密码
                startActivity(new Intent(SecurityActivity.this,LoginVerificationActivity.class));
                break;
        }
    }
}
